<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一拖拉机股份有限公司 - BS 服务管理系统</title>
    <link rel="stylesheet" href="Bootstrap/css/bootstrap.css">
</head>

<body>
    <div class="container">
        <!-- 导航 -->
        <div class="row mt-5">
            <nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
                <div class="container-fluid">
                    <a class="navbar-brand p-0 shadow" href="#">
                        <img src="imgs/logo.jpg" alt="" width="50px" class="rounded p-1">
                    </a>
                    <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                        data-bs-target="#navbarSupportedContent">
                        <span class="navbar-toggler-icon"></span>
                    </button>
                    <div class="collapse navbar-collapse" id="navbarSupportedContent">
                        <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                            <li class="nav-item">
                                <a class="nav-link" href="userFile.html" target="_blank">用户档案</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="command.html" target="_blank">指令单</a>
                            </li>
                            <li class="nav-item dropdown">
                                <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                                    申报表
                                </a>
                                <ul class="dropdown-menu">
                                  <li><a class="dropdown-item" href="amendsTemp.html" target="_blank">申报表查询</a></li>
                                  <li><a class="dropdown-item" href="amendsTempModify.html" target="_blank">申报表确认</a></li>
                                  <li><a class="dropdown-item" href="imageLogin.html">Image login System</a></li>
                                </ul>
                            </li>                      
                            <li class="nav-item">
                                <a class="nav-link" href="./waterfull/waterfall.html" target="_blank">图片浏览</a>
                                <!--<a class="nav-link" href="image.html" target="_blank">图片浏览</a>-->
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="baiduMap.html" target="_blank">百度地图</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#" target="_blank">费用单</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </nav>
        </div>
        <div class="row mt-2 g-2">
            <!-- 第一列 -->
            <div class="col-sm-12 col-md-6 col-lg-4">
                <div class="rounded">
                    <h5 class="ms-2 mt-2 text-muted">待处理业务</h5>
                    <ul class="list-group list-unstyled px-2 pb-2 d-grid gap-2">
                        <li class="list-group-item bg-warning bg-gradient py-1 px-3 rounded-pill" <a href=""
                            class="text-decoration-none link-secondary">指令单 5 条未受理</a></li>
                        <li class="list-group-item bg-warning bg-gradient py-1 px-3 rounded-pill" <a href=""
                            class="text-decoration-none link-secondary">指令单 5 条未完结</a></li>
                        <li class="list-group-item bg-warning bg-gradient py-1 px-3 rounded-pill" <a href=""
                            class="text-decoration-none link-secondary">指令单 5 条未生成申报表</a></li>
                        <li class="list-group-item bg-warning bg-gradient py-1 px-3 rounded-pill" <a href=""
                            class="text-decoration-none link-secondary">申报表 5 条未确认</a></li>
                        <li class="list-group-item bg-warning bg-gradient py-1 px-3 rounded-pill" <a href=""
                            class="text-decoration-none link-secondary">费用单 5 条未确认</a></li>

                    </ul>

                </div>
            </div>
            <!-- 第二列 -->
            <div class="col-sm-12 col-md-6 col-lg-5">
                <div class="card mb-2">
                    <div class="card-body">
                        <h5 class="card-title" id="card-title1">Card title</h5>
                        <div class="d-flex justify-content-between mb-2">
                            <h6 class="card-subtitle m-0 text-muted" id="card-subtitle1">Date</h6>
                            <span class="badge bg-info rounded-pill" id="badge1"></span>
                        </div>
                        
                        <p class="card-text" id="card-text1">Some quick example text to build on the card title and make
                            up the bulk of
                            the card's content.</p>
                        <a href="#" class="btn btn-sm btn-primary" id="downBtn1">下载附件</a>
                    </div>
                </div>
                <div class="card">
                    <div class="card-body">
                        <h5 class="card-title" id="card-title2">Card title</h5>
                        <div class="d-flex justify-content-between mb-2">
                            <h6 class="card-subtitle m-0 text-muted" id="card-subtitle2">Date</h6>
                            <span class="badge bg-info rounded-pill" id="badge2"></span>
                        </div>
                        <p class="card-text" id="card-text2">Some quick example text to build on the card title and make
                            up the bulk of
                            the card's content.</p>
                        <a href="#" class="btn btn-sm btn-primary" id="downBtn2">下载附件</a>
                    </div>
                </div>
            </div>
            <!-- 第三列 -->
            <div class="col-sm-12 col-lg-3 d-none d-lg-block">
                <div class="w-100 bg-danger rounded p-2">
                    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Voluptatem voluptate exercitationem
                    consequuntur vero culpa rerum laboriosam enim quas repudiandae quam?
                    Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum exercitationem tenetur doloribus
                    consequatur, eum in sapiente illo! Repellat maxime fugit, magnam aspernatur quod id non voluptates
                    dolor exercitationem! Enim, iure voluptas dolorem veniam ipsum facere et veritatis vero voluptate
                    quas animi totam. Officiis velit dolor rem praesentium blanditiis. Quasi, dolore.
                </div>
            </div>
        </div>
    </div>

    <script src="./Bootstrap/js/bootstrap.bundle.js"></script>
    <script src="js/jquery.min.js"></script>
    <script src="js/holder.js"></script>
    <script>
        let jsfw = 'http://www.jsfw.net';
        $.ajax({
            type: 'post',
            url: 'http://wp.jsfw.net/ytobs/ajax/placardTop5.php',
            dataType: 'jsonp',
            jsonp: "jsoncallback",
            success: function (data) {
                $("#card-title1").text(data[0].PlacardTitle);
                $("#card-title2").text(data[1].PlacardTitle);
                $("#card-subtitle1").text(data[0].PlacardDate);
                $("#card-subtitle2").text(data[1].PlacardDate);
                $("#badge1").text(data[0].BillSeq);
                $("#badge2").text(data[1].BillSeq);
                $("#card-text1").text(data[0].PlacardText);
                $("#card-text2").text(data[1].PlacardText);
                if(data[0].DownLoadURL){
                    $("#downBtn1").removeClass('disabled');
                    $("#downBtn1").attr("href",jsfw + data[0].DownLoadURL);
                }else{
                    $("#downBtn1").addClass('disabled');
                }
                if(data[1].DownLoadURL){
                    $("#downBtn2").removeClass('disabled');
                    $("#downBtn2").attr("href",jsfw + data[1].DownLoadURL);
                }else{
                    $("#downBtn2").addClass('disabled');
                }


                // <td>" + data[k].PlacardDate + "</td>\
                // <td><a href='http://www.jsfw.net" + data[k].DownLoadURL + "'>" + downLoadURL + "</a></td></tr>");
            },
            error: function () {
                alert('Ajax获取数据失败!');
            }
        });
    </script>
</body>

</html>